<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>

<script type="text/javascript">
	function test(value){
			alert("www-"+value);
			var base = "<c:url value='/admin/authorization.do'/>";
			var ruolo = base + "?ruolo=" + dojo.byId("ruoli")[dojo.byId("ruoli").selectedIndex].value +"&fragments=lista";
			alert(ruolo);
			 var xhrArgs = {
						url: ruolo,
						headers: {"Accept" : "text/html;type=ajax"}	,	                
		                load: function(data, ioargs) {
	                		alert(data);
	                		alert(ioargs);
	                		dojo.byId("dettaglio").innerHTML=data;
	                		//Spring.remoting.handleResponse(data,ioargs);
		                    //dojo.byId("response2").innerHTML = "Message posted.";
		                },
		                error: function(error) {
		                    //We'll 404 in the demo, but that's okay.  We don't have a 'postIt' service on the
		                    //docs server.
		                    dojo.byId("response2").innerHTML = "Message error." + error.message;
		                }
		            };
			//xhrArgs.url = ruolo;
			var deferred = dojo.xhrPost(xhrArgs);
	}
</script>

ee
<select id="ruoli"  onchange="test()">
	<c:forEach items="${ruoli}" var="r" >
		<option value="${r.codRuolo}"><c:out value="${r.descrRuolo}"/></option>
	</c:forEach>
</select>
<%--
<c:forEach items="${listaAuth}" var="a">
	<c:out value="${a}"></c:out>
</c:forEach>
 --%>
 <div id="dettaglio">
 	<tiles:insertAttribute name="lista" flush="true"/>
 </div>


	



